const path = require('path')
module.exports = {
  devServer: {
    port: 3000,
    open: true,
    hot: true, // 自动保存
    proxy: {
      '/conner': {
        target: 'https://api.it120.cc',
        changeOrigin: true,
        pathRewrite: {
          '^/conner': '/conner'
        }
      }
    }
  },
  lintOnSave: false,
  // 配置路径 简化路径地址 引入时只需要加_
  chainWebpack: config => {
    config.resolve.alias
      .set('@', path.join(__dirname, 'src'))
      .set('_components', path.join(__dirname, 'src/components'))
      .set('_views', path.join(__dirname, 'src/views'))
      .set('_utils', path.join(__dirname, 'src/utils'))
      .set('_api', path.join(__dirname, 'src/api'))
  }
}
